package com.oktest.measure.item.home

import android.content.Context
import android.graphics.drawable.Drawable
import android.view.View
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.oktest.measure.R
import com.to.aboomy.banner.HolderCreator

/**
 * @Author hhh
 * @Date 2020/9/17
 */


class ImageHolderCreator :HolderCreator {
    override fun createView(context: Context?, index: Int, o: Any?): View {
        val iv = ImageView(context)
        iv.scaleType = ImageView.ScaleType.FIT_XY
        Glide.with(iv)
            .load(o)
            .error(R.drawable.ic_image_default)
            .autoClone()
            .into(iv)
        return iv
    }
}